<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/axios.min.js"></script>
    <script src="/js/order.js"></script>

    <style>
        .dialogDiv{
            background-color: rgba(255,0,0,0.5);
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0px;
            top: 0px;
            display: flex;
            justify-content: center;
            align-items: center;
            visibility: hidden;
        }
        .contentDiv{
            border: 3px solid #000;
            width: 400px;
            height: 300px;
            padding: 50px;
            background-color: white;
        }
    </style>
</head>
<body>
    <table border="1" width="80%" cellspacing="0">
    <thead ><tr><th>下单人</th><th>下单时间</th><th>送货地址</th><th>操作</th></tr></thead>
    <tbody id="data"></tbody>
    </table>

    <div id="cutDiv"></div>
    <input type="button" value="添加" onclick="showAddDiv()">

    <div id="addDiv" class="dialogDiv">
        <div class="contentDiv">
            <h1 style="text-align: center">添加订单</h1>
            下单人:<input type="text" id="userName"><br>
            送货地址:<input type="text" id="address"><br>
            <input type="button" value="添加" onclick="addOrder()">
            <input type="button" value="取消" onclick="exitAdd()">
        </div>
    </div>

    <div id="updateDiv" class="dialogDiv">
        <div class="contentDiv">
            <h1 style="text-align: center">修改订单</h1>
            下单人:<span type="text" id="nameSpan"></span><br>
            送货地址:<input type="text" id="updateAddress"><br>
            <input type="hidden" id="id">
            <input type="button" value="修改" onclick="updateOrder()">
            <input type="button" value="取消" onclick="exitUpdate()">
        </div>
    </div>
</body>
</html>